package action.creditapproval;

import java.util.List;

import model.credit.Creditapplyenterprise;
import model.credit.Creditapplypersonal;
import model.credit.Lcbank;
import model.personal.Personalbasic;

import service.credit.CreditApplyEnterpriseService;
import service.credit.CreditApplyPersonalService;
import service.credit.EnterpriseSearchService;
import service.credit.LcBankService;
import service.credit.PersonalSearchService;
import service.dropdown.DropDownService;
import vo.EnterpriseInforBean;
import core.action.BaseAction;
import exception.Exceptions;

public class ShowCreditApplyDetail extends BaseAction{
	private Integer applyid;
	
	private EnterpriseInforBean enterpriseInforBean;
	private EnterpriseSearchService enterpriseSearchService;
	private CreditApplyEnterpriseService creditApplyEnterpriseService;
	private CreditApplyPersonalService creditApplyPersonalService;
	
	private List<Lcbank> lcBankList;
	private LcBankService lcBankService;
	
	
	private List<?> dcommonList;
	private DropDownService dropDownService;
	
	private List<?> culturaList;
	private Personalbasic person;
	private PersonalSearchService personalSearchService;
	
	public String enterpriseDetail() throws Exceptions{
		this.lcBankList = this.lcBankService.getList(applyid);
		Creditapplyenterprise creditapplyenterprise = this.creditApplyEnterpriseService.getCreditapplyEnterpriseById(applyid);
		if(creditapplyenterprise == null){
			throw new Exceptions("请输入正确的申请单号码！");
		}
		this.enterpriseInforBean = this.enterpriseSearchService.searchOneEnterprise(creditapplyenterprise.getClientid());
		return "enterprise";
	}
	public String personalDetail() throws Exceptions{
		this.culturaList = this.dropDownService.getCommonList(6, 0);
		this.dcommonList = this.dropDownService.getListBean(2, 0);
		Creditapplypersonal creditapplypersonal = this.creditApplyPersonalService.getOneById(applyid);
		if(creditapplypersonal == null){
			throw new Exceptions("请输入正确的申请单号！");
		}
		this.person = this.personalSearchService.searchOnePerson(creditapplypersonal.getClientid());
		return "personal";
	}
	public Integer getApplyid() {
		return applyid;
	}
	public void setApplyid(Integer applyid) {
		this.applyid = applyid;
	}
	public EnterpriseInforBean getEnterpriseInforBean() {
		return enterpriseInforBean;
	}
	public void setEnterpriseInforBean(EnterpriseInforBean enterpriseInforBean) {
		this.enterpriseInforBean = enterpriseInforBean;
	}
	public EnterpriseSearchService getEnterpriseSearchService() {
		return enterpriseSearchService;
	}
	public void setEnterpriseSearchService(
			EnterpriseSearchService enterpriseSearchService) {
		this.enterpriseSearchService = enterpriseSearchService;
	}
	public List<Lcbank> getLcBankList() {
		return lcBankList;
	}
	public void setLcBankList(List<Lcbank> lcBankList) {
		this.lcBankList = lcBankList;
	}
	public LcBankService getLcBankService() {
		return lcBankService;
	}
	public void setLcBankService(LcBankService lcBankService) {
		this.lcBankService = lcBankService;
	}
	public CreditApplyEnterpriseService getCreditApplyEnterpriseService() {
		return creditApplyEnterpriseService;
	}
	public void setCreditApplyEnterpriseService(
			CreditApplyEnterpriseService creditApplyEnterpriseService) {
		this.creditApplyEnterpriseService = creditApplyEnterpriseService;
	}
	public CreditApplyPersonalService getCreditApplyPersonalService() {
		return creditApplyPersonalService;
	}
	public void setCreditApplyPersonalService(
			CreditApplyPersonalService creditApplyPersonalService) {
		this.creditApplyPersonalService = creditApplyPersonalService;
	}
	public List<?> getDcommonList() {
		return dcommonList;
	}
	public void setDcommonList(List<?> dcommonList) {
		this.dcommonList = dcommonList;
	}
	public DropDownService getDropDownService() {
		return dropDownService;
	}
	public void setDropDownService(DropDownService dropDownService) {
		this.dropDownService = dropDownService;
	}
	public List<?> getCulturaList() {
		return culturaList;
	}
	public void setCulturaList(List<?> culturaList) {
		this.culturaList = culturaList;
	}
	public Personalbasic getPerson() {
		return person;
	}
	public void setPerson(Personalbasic person) {
		this.person = person;
	}
	public PersonalSearchService getPersonalSearchService() {
		return personalSearchService;
	}
	public void setPersonalSearchService(PersonalSearchService personalSearchService) {
		this.personalSearchService = personalSearchService;
	}

}
